Skip to content

[pull] trunk from cli:trunk#24

Merged
pull[bot] merged 12 commits intodemaford:trunkfrom
cli:trunk
Jul 16, 2025
Merged

[pull] trunk from cli:trunk#24
pull[bot] merged 12 commits intodemaford:trunkfrom
cli:trunk

Conversation

@pull
Copy link

@pull pull bot commented Jul 16, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

andyfeller added 12 commits July 2, 2025 16:22
- updated command documentation for new `--assignee @copilot` syntax
- updated `gh issue create` logic with feature detection for actor availability
- fixed bug where `--assignee` would not select default assignees due to login vs display name mismatch
- updated survey prompt logic to avoid parsing prompt options in favor of correlating with assignee / actor source

One thing that is not included in these changes is incorporating the GraphQL mutation to replace assignees with actors, which I will continue iterating on.
This commit refactors how `gh issue create` and `gh pr create` retrieve information needed to resolve metadata to be more in line with the approach used in `gh issue edit` and `gh pr edit`.

Previously, both commands used `prshared.fillMetadata(...)` function to retrieve assignees, reviewers, labels, and teams outside of `api.RepoMetadata(..)`.  Now, these commands will consistently use the same logic and data for resolving metadata.
This commit is primarily focused on fixing the existing `gh issue create` tests with the changes to the underlying queries retrieving the data for resolving metadata.

Additionally, a new test case for `gh issue create --web --assignee @copilot` was added to mirror existing tests.  While exercising this capability, I found out the web UI apparently wants `copilot` instead of the `copilot-swe-agent` login, so changes to address that were a part of this commit.
These are the minimum fixes necessary to repair `gh pr create` tests after refactoring the underlying metadata resolution logic.
Thanks to @BagToad, this commit refactors the argument to `NewCopilotReplacer(bool)` from being where this is used to what it effect is has.

Because there is already precedence for display name being `<login> (<name>)`, I worried there would be confusion for `Copilot (AI)` being display name for assignees and reviewers but `Copilot` when going to GitHub.com UI.  Instead, I renamed the argument based on whether the login is returned / replaced.
Based on PR feedback from @BagToad, this commit creates a new constant for the Copilot bot name, which is used in the assignee / reviewer selection as well as replacing `@copilot` when going to GitHub.com UI
In refactoring how this parameter works, I forgot to update the related tests to match.
…ilot

Assign Copilot during `gh issue create`
@pull pull bot locked and limited conversation to collaborators Jul 16, 2025
@pull pull bot added the ⤵️ pull label Jul 16, 2025
@pull pull bot merged commit 260519d into demaford:trunk Jul 16, 2025
1 check failed
@pull pull bot had a problem deploying to cli-automation July 16, 2025 22:25 Failure
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant